VDoc lets extend this list of subscription types by giving you the possibility to define your own subscription classes.
A class to be integrated in the subscription mechanism must extend the basic class named com.axemble.vdoc.sdk.mapping.extensions.BaseMappingExtension.
Method | Description | Parameters |
onLoad | This method will be called on the document loading | *Element : XML node corresponding to the subscription description. |
onChange | This method will be called on each modification made to the field specified in the field-id tag (ex. ChampEnCoursDeModification) | *Property : the property being modified. *Property : the property being modified. *Element : XML node corresponding to the subscription description. |
The subscription class is directly defined in the subscriptions XML block.
The generic syntax of subscriptions is the following:
<subscription name="onChange" field-id="ChampEnCoursDeModification" subscription-class="NomCompletDeVotreClasse"> <!--.set some parameters here...--> </subscription>
Example
The following example displays a class which branch off the classBaseMappingExtension.
public class SimpleMappingExtension extends BaseMappingExtension { public void onLoad( Element element ) { // method triggered on the document loading } public void onChange( IProperty property, Element element ) { // method triggered on the property change } }